\(\int \frac {(d+e x^2)^2 (a+b \arctan (c x))}{x^7} \, dx\) [1135]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 111 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^7} \, dx=-\frac {b c d^2}{30 x^5}+\frac {b c d \left (c^2 d-3 e\right )}{18 x^3}-\frac {b c \left (c^4 d^2-3 c^2 d e+3 e^2\right )}{6 x}-\frac {b \left (c^2 d-e\right )^3 \arctan (c x)}{6 d}-\frac {\left (d+e x^2\right )^3 (a+b \arctan (c x))}{6 d x^6} \]

[Out]

-1/30*b*c*d^2/x^5+1/18*b*c*d*(c^2*d-3*e)/x^3-1/6*b*c*(c^4*d^2-3*c^2*d*e+3*e^2)/x-1/6*b*(c^2*d-e)^3*arctan(c*x)
/d-1/6*(e*x^2+d)^3*(a+b*arctan(c*x))/d/x^6

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {270, 5096, 12, 472, 209} \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^7} \, dx=-\frac {\left (d+e x^2\right )^3 (a+b \arctan (c x))}{6 d x^6}-\frac {b \arctan (c x) \left (c^2 d-e\right )^3}{6 d}+\frac {b c d \left (c^2 d-3 e\right )}{18 x^3}-\frac {b c \left (c^4 d^2-3 c^2 d e+3 e^2\right )}{6 x}-\frac {b c d^2}{30 x^5} \]

[In]

Int[((d + e*x^2)^2*(a + b*ArcTan[c*x]))/x^7,x]

[Out]

-1/30*(b*c*d^2)/x^5 + (b*c*d*(c^2*d - 3*e))/(18*x^3) - (b*c*(c^4*d^2 - 3*c^2*d*e + 3*e^2))/(6*x) - (b*(c^2*d -
 e)^3*ArcTan[c*x])/(6*d) - ((d + e*x^2)^3*(a + b*ArcTan[c*x]))/(6*d*x^6)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*
c*(m + 1))), x] /; FreeQ[{a, b, c, m, n, p}, x] && EqQ[(m + 1)/n + p + 1, 0] && NeQ[m, -1]

Rule 472

Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_))/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegr
and[(e*x)^m*((a + b*x^n)^p/(c + d*x^n)), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[n
, 0] && IGtQ[p, 0] && (IntegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])

Rule 5096

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With[{u =
 IntHide[(f*x)^m*(d + e*x^2)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^
2*x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, m, q}, x] && ((IGtQ[q, 0] &&  !(ILtQ[(m - 1)/2, 0] && GtQ[m +
2*q + 3, 0])) || (IGtQ[(m + 1)/2, 0] &&  !(ILtQ[q, 0] && GtQ[m + 2*q + 3, 0])) || (ILtQ[(m + 2*q + 1)/2, 0] &&
  !ILtQ[(m - 1)/2, 0]))

Rubi steps \begin{align*} \text {integral}& = -\frac {\left (d+e x^2\right )^3 (a+b \arctan (c x))}{6 d x^6}-(b c) \int \frac {\left (d+e x^2\right )^3}{6 x^6 \left (-d-c^2 d x^2\right )} \, dx \\ & = -\frac {\left (d+e x^2\right )^3 (a+b \arctan (c x))}{6 d x^6}-\frac {1}{6} (b c) \int \frac {\left (d+e x^2\right )^3}{x^6 \left (-d-c^2 d x^2\right )} \, dx \\ & = -\frac {\left (d+e x^2\right )^3 (a+b \arctan (c x))}{6 d x^6}-\frac {1}{6} (b c) \int \left (-\frac {d^2}{x^6}+\frac {d \left (c^2 d-3 e\right )}{x^4}+\frac {-c^4 d^2+3 c^2 d e-3 e^2}{x^2}+\frac {\left (c^2 d-e\right )^3}{d \left (1+c^2 x^2\right )}\right ) \, dx \\ & = -\frac {b c d^2}{30 x^5}+\frac {b c d \left (c^2 d-3 e\right )}{18 x^3}-\frac {b c \left (c^4 d^2-3 c^2 d e+3 e^2\right )}{6 x}-\frac {\left (d+e x^2\right )^3 (a+b \arctan (c x))}{6 d x^6}-\frac {\left (b c \left (c^2 d-e\right )^3\right ) \int \frac {1}{1+c^2 x^2} \, dx}{6 d} \\ & = -\frac {b c d^2}{30 x^5}+\frac {b c d \left (c^2 d-3 e\right )}{18 x^3}-\frac {b c \left (c^4 d^2-3 c^2 d e+3 e^2\right )}{6 x}-\frac {b \left (c^2 d-e\right )^3 \arctan (c x)}{6 d}-\frac {\left (d+e x^2\right )^3 (a+b \arctan (c x))}{6 d x^6} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.07 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.01 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^7} \, dx=-\frac {b c d^2 x \operatorname {Hypergeometric2F1}\left (-\frac {5}{2},1,-\frac {3}{2},-c^2 x^2\right )+5 \left (\left (d^2+3 d e x^2+3 e^2 x^4\right ) (a+b \arctan (c x))+b c d e x^3 \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},-c^2 x^2\right )+3 b c e^2 x^5 \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-c^2 x^2\right )\right )}{30 x^6} \]

[In]

Integrate[((d + e*x^2)^2*(a + b*ArcTan[c*x]))/x^7,x]

[Out]

-1/30*(b*c*d^2*x*Hypergeometric2F1[-5/2, 1, -3/2, -(c^2*x^2)] + 5*((d^2 + 3*d*e*x^2 + 3*e^2*x^4)*(a + b*ArcTan
[c*x]) + b*c*d*e*x^3*Hypergeometric2F1[-3/2, 1, -1/2, -(c^2*x^2)] + 3*b*c*e^2*x^5*Hypergeometric2F1[-1/2, 1, 1
/2, -(c^2*x^2)]))/x^6

Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.50

method result size
parts \(a \left (-\frac {d^{2}}{6 x^{6}}-\frac {e d}{2 x^{4}}-\frac {e^{2}}{2 x^{2}}\right )+b \,c^{6} \left (-\frac {\arctan \left (c x \right ) d^{2}}{6 c^{6} x^{6}}-\frac {\arctan \left (c x \right ) d e}{2 c^{6} x^{4}}-\frac {\arctan \left (c x \right ) e^{2}}{2 c^{6} x^{2}}-\frac {-\frac {-c^{4} d^{2}+3 c^{2} d e -3 e^{2}}{c x}-\frac {d \left (c^{2} d -3 e \right )}{3 c \,x^{3}}+\frac {d^{2}}{5 c \,x^{5}}+\left (c^{4} d^{2}-3 c^{2} d e +3 e^{2}\right ) \arctan \left (c x \right )}{6 c^{4}}\right )\) \(167\)
derivativedivides \(c^{6} \left (\frac {a \left (-\frac {d^{2}}{6 c^{2} x^{6}}-\frac {d e}{2 c^{2} x^{4}}-\frac {e^{2}}{2 c^{2} x^{2}}\right )}{c^{4}}+\frac {b \left (-\frac {\arctan \left (c x \right ) d^{2}}{6 c^{2} x^{6}}-\frac {\arctan \left (c x \right ) d e}{2 c^{2} x^{4}}-\frac {\arctan \left (c x \right ) e^{2}}{2 c^{2} x^{2}}-\frac {\left (c^{4} d^{2}-3 c^{2} d e +3 e^{2}\right ) \arctan \left (c x \right )}{6}+\frac {-c^{4} d^{2}+3 c^{2} d e -3 e^{2}}{6 c x}+\frac {d \left (c^{2} d -3 e \right )}{18 c \,x^{3}}-\frac {d^{2}}{30 c \,x^{5}}\right )}{c^{4}}\right )\) \(178\)
default \(c^{6} \left (\frac {a \left (-\frac {d^{2}}{6 c^{2} x^{6}}-\frac {d e}{2 c^{2} x^{4}}-\frac {e^{2}}{2 c^{2} x^{2}}\right )}{c^{4}}+\frac {b \left (-\frac {\arctan \left (c x \right ) d^{2}}{6 c^{2} x^{6}}-\frac {\arctan \left (c x \right ) d e}{2 c^{2} x^{4}}-\frac {\arctan \left (c x \right ) e^{2}}{2 c^{2} x^{2}}-\frac {\left (c^{4} d^{2}-3 c^{2} d e +3 e^{2}\right ) \arctan \left (c x \right )}{6}+\frac {-c^{4} d^{2}+3 c^{2} d e -3 e^{2}}{6 c x}+\frac {d \left (c^{2} d -3 e \right )}{18 c \,x^{3}}-\frac {d^{2}}{30 c \,x^{5}}\right )}{c^{4}}\right )\) \(178\)
parallelrisch \(-\frac {15 x^{6} \arctan \left (c x \right ) b \,c^{6} d^{2}-45 x^{6} \arctan \left (c x \right ) b \,c^{4} d e +15 b \,c^{5} d^{2} x^{5}+45 x^{6} \arctan \left (c x \right ) b \,c^{2} e^{2}-45 a \,c^{2} e^{2} x^{6}-45 b \,c^{3} d e \,x^{5}+45 b c \,e^{2} x^{5}-5 x^{3} b \,c^{3} d^{2}+45 x^{4} \arctan \left (c x \right ) b \,e^{2}+45 a \,e^{2} x^{4}+15 b c e d \,x^{3}+45 x^{2} \arctan \left (c x \right ) b d e +45 a d e \,x^{2}+3 b c \,d^{2} x +15 b \,d^{2} \arctan \left (c x \right )+15 d^{2} a}{90 x^{6}}\) \(186\)
risch \(\frac {i b \left (3 x^{4} e^{2}+3 x^{2} e d +d^{2}\right ) \ln \left (i c x +1\right )}{12 x^{6}}-\frac {45 i \ln \left (-c x +i\right ) b \,c^{4} d e \,x^{6}-45 i \ln \left (-c x +i\right ) b \,c^{2} e^{2} x^{6}+15 i \ln \left (-c x -i\right ) b \,c^{6} d^{2} x^{6}-15 i \ln \left (-c x +i\right ) b \,c^{6} d^{2} x^{6}+45 i \ln \left (-c x -i\right ) b \,c^{2} e^{2} x^{6}+45 i b \,e^{2} \ln \left (-i c x +1\right ) x^{4}+30 b \,c^{5} d^{2} x^{5}-90 b \,c^{3} d e \,x^{5}+45 i b d e \ln \left (-i c x +1\right ) x^{2}-10 x^{3} b \,c^{3} d^{2}+90 b c \,e^{2} x^{5}+15 i b \,d^{2} \ln \left (-i c x +1\right )+90 a \,e^{2} x^{4}+30 b c e d \,x^{3}-45 i \ln \left (-c x -i\right ) b \,c^{4} d e \,x^{6}+90 a d e \,x^{2}+6 b c \,d^{2} x +30 d^{2} a}{180 x^{6}}\) \(301\)

[In]

int((e*x^2+d)^2*(a+b*arctan(c*x))/x^7,x,method=_RETURNVERBOSE)

[Out]

a*(-1/6*d^2/x^6-1/2*e*d/x^4-1/2*e^2/x^2)+b*c^6*(-1/6*arctan(c*x)*d^2/c^6/x^6-1/2*arctan(c*x)/c^6*d*e/x^4-1/2*a
rctan(c*x)/c^6*e^2/x^2-1/6/c^4*(-(-c^4*d^2+3*c^2*d*e-3*e^2)/c/x-1/3*d/c*(c^2*d-3*e)/x^3+1/5/c*d^2/x^5+(c^4*d^2
-3*c^2*d*e+3*e^2)*arctan(c*x)))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.31 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^7} \, dx=-\frac {45 \, a e^{2} x^{4} + 15 \, {\left (b c^{5} d^{2} - 3 \, b c^{3} d e + 3 \, b c e^{2}\right )} x^{5} + 3 \, b c d^{2} x + 45 \, a d e x^{2} - 5 \, {\left (b c^{3} d^{2} - 3 \, b c d e\right )} x^{3} + 15 \, a d^{2} + 15 \, {\left (3 \, b e^{2} x^{4} + {\left (b c^{6} d^{2} - 3 \, b c^{4} d e + 3 \, b c^{2} e^{2}\right )} x^{6} + 3 \, b d e x^{2} + b d^{2}\right )} \arctan \left (c x\right )}{90 \, x^{6}} \]

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x))/x^7,x, algorithm="fricas")

[Out]

-1/90*(45*a*e^2*x^4 + 15*(b*c^5*d^2 - 3*b*c^3*d*e + 3*b*c*e^2)*x^5 + 3*b*c*d^2*x + 45*a*d*e*x^2 - 5*(b*c^3*d^2
 - 3*b*c*d*e)*x^3 + 15*a*d^2 + 15*(3*b*e^2*x^4 + (b*c^6*d^2 - 3*b*c^4*d*e + 3*b*c^2*e^2)*x^6 + 3*b*d*e*x^2 + b
*d^2)*arctan(c*x))/x^6

Sympy [A] (verification not implemented)

Time = 0.42 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.73 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^7} \, dx=- \frac {a d^{2}}{6 x^{6}} - \frac {a d e}{2 x^{4}} - \frac {a e^{2}}{2 x^{2}} - \frac {b c^{6} d^{2} \operatorname {atan}{\left (c x \right )}}{6} - \frac {b c^{5} d^{2}}{6 x} + \frac {b c^{4} d e \operatorname {atan}{\left (c x \right )}}{2} + \frac {b c^{3} d^{2}}{18 x^{3}} + \frac {b c^{3} d e}{2 x} - \frac {b c^{2} e^{2} \operatorname {atan}{\left (c x \right )}}{2} - \frac {b c d^{2}}{30 x^{5}} - \frac {b c d e}{6 x^{3}} - \frac {b c e^{2}}{2 x} - \frac {b d^{2} \operatorname {atan}{\left (c x \right )}}{6 x^{6}} - \frac {b d e \operatorname {atan}{\left (c x \right )}}{2 x^{4}} - \frac {b e^{2} \operatorname {atan}{\left (c x \right )}}{2 x^{2}} \]

[In]

integrate((e*x**2+d)**2*(a+b*atan(c*x))/x**7,x)

[Out]

-a*d**2/(6*x**6) - a*d*e/(2*x**4) - a*e**2/(2*x**2) - b*c**6*d**2*atan(c*x)/6 - b*c**5*d**2/(6*x) + b*c**4*d*e
*atan(c*x)/2 + b*c**3*d**2/(18*x**3) + b*c**3*d*e/(2*x) - b*c**2*e**2*atan(c*x)/2 - b*c*d**2/(30*x**5) - b*c*d
*e/(6*x**3) - b*c*e**2/(2*x) - b*d**2*atan(c*x)/(6*x**6) - b*d*e*atan(c*x)/(2*x**4) - b*e**2*atan(c*x)/(2*x**2
)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.31 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^7} \, dx=-\frac {1}{90} \, {\left ({\left (15 \, c^{5} \arctan \left (c x\right ) + \frac {15 \, c^{4} x^{4} - 5 \, c^{2} x^{2} + 3}{x^{5}}\right )} c + \frac {15 \, \arctan \left (c x\right )}{x^{6}}\right )} b d^{2} + \frac {1}{6} \, {\left ({\left (3 \, c^{3} \arctan \left (c x\right ) + \frac {3 \, c^{2} x^{2} - 1}{x^{3}}\right )} c - \frac {3 \, \arctan \left (c x\right )}{x^{4}}\right )} b d e - \frac {1}{2} \, {\left ({\left (c \arctan \left (c x\right ) + \frac {1}{x}\right )} c + \frac {\arctan \left (c x\right )}{x^{2}}\right )} b e^{2} - \frac {a e^{2}}{2 \, x^{2}} - \frac {a d e}{2 \, x^{4}} - \frac {a d^{2}}{6 \, x^{6}} \]

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x))/x^7,x, algorithm="maxima")

[Out]

-1/90*((15*c^5*arctan(c*x) + (15*c^4*x^4 - 5*c^2*x^2 + 3)/x^5)*c + 15*arctan(c*x)/x^6)*b*d^2 + 1/6*((3*c^3*arc
tan(c*x) + (3*c^2*x^2 - 1)/x^3)*c - 3*arctan(c*x)/x^4)*b*d*e - 1/2*((c*arctan(c*x) + 1/x)*c + arctan(c*x)/x^2)
*b*e^2 - 1/2*a*e^2/x^2 - 1/2*a*d*e/x^4 - 1/6*a*d^2/x^6

Giac [F]

\[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^7} \, dx=\int { \frac {{\left (e x^{2} + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{7}} \,d x } \]

[In]

integrate((e*x^2+d)^2*(a+b*arctan(c*x))/x^7,x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 0.91 (sec) , antiderivative size = 256, normalized size of antiderivative = 2.31 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^7} \, dx=-\frac {\frac {a\,d^2}{6}+\frac {b\,d^2\,\mathrm {atan}\left (c\,x\right )}{6}-\frac {a\,c^4\,e^2\,x^8}{2}+\frac {a\,e\,x^4\,\left (d\,c^2+e\right )}{2}+\frac {b\,c\,x^5\,\left (2\,c^4\,d^2-6\,c^2\,d\,e+9\,e^2\right )}{18}+\frac {b\,c\,d^2\,x}{30}+\frac {a\,d\,x^2\,\left (d\,c^2+3\,e\right )}{6}+\frac {b\,c^3\,x^7\,\left (c^4\,d^2-3\,c^2\,d\,e+3\,e^2\right )}{6}+\frac {b\,c\,d\,x^3\,\left (15\,e-2\,c^2\,d\right )}{90}+\frac {b\,d\,x^2\,\mathrm {atan}\left (c\,x\right )\,\left (d\,c^2+3\,e\right )}{6}+\frac {b\,c^2\,e^2\,x^6\,\mathrm {atan}\left (c\,x\right )}{2}+\frac {b\,e\,x^4\,\mathrm {atan}\left (c\,x\right )\,\left (d\,c^2+e\right )}{2}}{c^2\,x^8+x^6}-\frac {\mathrm {atan}\left (\frac {c^2\,x}{\sqrt {c^2}}\right )\,{\left (c^2\right )}^{5/2}\,\left (b\,c^4\,d^2-3\,b\,c^2\,d\,e+3\,b\,e^2\right )}{6\,c^3} \]

[In]

int(((a + b*atan(c*x))*(d + e*x^2)^2)/x^7,x)

[Out]

- ((a*d^2)/6 + (b*d^2*atan(c*x))/6 - (a*c^4*e^2*x^8)/2 + (a*e*x^4*(e + c^2*d))/2 + (b*c*x^5*(9*e^2 + 2*c^4*d^2
 - 6*c^2*d*e))/18 + (b*c*d^2*x)/30 + (a*d*x^2*(3*e + c^2*d))/6 + (b*c^3*x^7*(3*e^2 + c^4*d^2 - 3*c^2*d*e))/6 +
 (b*c*d*x^3*(15*e - 2*c^2*d))/90 + (b*d*x^2*atan(c*x)*(3*e + c^2*d))/6 + (b*c^2*e^2*x^6*atan(c*x))/2 + (b*e*x^
4*atan(c*x)*(e + c^2*d))/2)/(x^6 + c^2*x^8) - (atan((c^2*x)/(c^2)^(1/2))*(c^2)^(5/2)*(3*b*e^2 + b*c^4*d^2 - 3*
b*c^2*d*e))/(6*c^3)